package test;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import pojo.Person;

public class demo02 {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new FileSystemXmlApplicationContext("C:\\Users\\wl\\Desktop\\牛逼\\java83\\day02\\src\\applicationContext.xml");
        ApplicationContext applicationContext1 = new ClassPathXmlApplicationContext("applicationContext.xml");
        Person person = (Person) applicationContext.getBean("person");
        Person person1 = (Person) applicationContext1.getBean("person");
        person.eat();
        System.out.println(person);
        person1.eat();
        System.out.println(person1);
    }
}
